<template>
  <div class="dashboard-container">
    <el-carousel :interval="4000" type="card" height="400px">
      <el-carousel-item v-for="item in list" :key="item">
        <img id="img" :src="item.cover">
      </el-carousel-item>
      <div>
        <span>biaoti</span>
      </div>
    </el-carousel>

  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import echarts from 'echarts'
  import player from '@/api/dbwork/player'
  import news from '@/api/dbwork/news'
  export default {

    name: 'Dashboard',
    computed: {
      ...mapGetters([
        'name',
        'roles'
      ])
    },
    data(){
      return{
        charts:{},
        list:{}
      }
    },
    created() {
      this.getInfo()
    },
    methods:{
      getInfo(){
        news.getNewsTopSix()
          .then(response=>{
            this.list = response.data.list
          })
      }
    }
  }
</script>

<style>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0px;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
  #img {
    max-width: 100%;
    max-height: 100%;
  }
</style>
